import request from "@/utils/request.js"

/**
 * @description: 检查上报列表
 * @param {*} data 接口参数 
 * @return {
	 "name":"",  //重点单位名称
	 "provinceId":"",  //省id
	 "cityId":"",  //市id
	 "zoneId":"",  //区id
	 "streetId":"",  //街道id
	 "address":"",  //详情地址
	 
 }
 */
export function institutionList(query, data) {
	return request({
		url: `/system/institution/list?pageNum=${query.pageNum}&pageSize=${query.pageSize}`,
		method: 'post',
		data,
	})
}

/**
 * @description: 检查上报列表详情
 * @param {*} data 接口参数 
 * @return {
	 "institutionId":"",  //id
 }
 */
export function institutionItem(institutionId) {
	return request({
		url: `/system/institution/getCheckQuestionnaire?institutionId=` + institutionId,
		method: 'get',
	})
}

/**
 * @description: 派出所自主检查
 * @param {Number} : 
 */
export function taskAdd(data) {
	return request({
		url: `/system/task/addSelfCheckTask`,
		method: 'post',
		data,
	})
}

// 查询目标单位基本信息详情
export function getinstitutiondetail(institutionId) {
	return request({
		url: `/system/institution/${institutionId}`,
		method: "get",
	});
}
// 查询目标单位安全诊断详情
export function getCheckCount(data) {
	return request({
		url: `/system/statistics/getInstitutionCheckCount`,
		method: "post",
		data
	});
}
// 查询目标单位安全诊断详情
export function getcheckRecordList(query, data) {
	return request({
		url: `/system/task/checkRecordList?pageNum=${query.pageNum}&pageSize=${query.pageSize}`,
		method: "post",
		data
	});
}